4D Chart v13

Referring to 4D Chart Documents

Home

 
4D Chart v13
Referring to 4D Chart Documents

Referring to 4D Chart Documents  


 

 

When you use commands to control a 4D Chart document, you need to identify the document by its area ID number. The area ID number is internal to 4D Chart and is normally stored in a variable.

A 4D Chart document can exist in any of three locations: in an area on a form, in a plug-in window, or in an offscreen area. Wherever the document is located, 4D Chart needs its area ID number to locate it and operate on it.

4D Chart uses variables to store the location of 4D Chart areas, plug-in windows, and offscreen areas. You reference the area on which you want to perform an operation by passing the variable containing the area’s ID number as a parameter to the command or function.

In the command descriptions that follow this introduction, the area parameter refers to the variable identifying the document area.

There are two types of area variables:

  • Plug-in area object names,
  • Variables you create for a plug-in window or offscreen area.

When you create and name a 4D Chart area on a form, 4D automatically recognizes the name of the 4D Chart area as a variable referring to the area. For example, you would refer to the Profits area by specifying “Profits” as the area parameter.

When you create a plug-in window or offscreen area using the Open external window or CT New offscreen area functions, the area ID number returned by the function should be stored in a variable. You can then use the variable to refer to the plug-in window or offscreen area in other commands and functions.

To store the value in a variable, you place the variable name and the assignment operator (:=) to the left of the function in the line of code.

The following example creates a 4D Chart plug-in window and stores the area ID number in the MyArea variable:

 MyArea:=Open external window(30;30;350;450;8;"Profits";"_4D Chart")

 
PROPERTIES 

Product: 4D Chart
Theme: Introduction to the language

 
SEE ALSO 

Locations for 4D Chart
Using the 4D Chart Default Area